<template>
	<view>
		<view class="items">
			<view class="item" v-for="(item,key) in suggestItems" :key='key'>
					<router-link class="link"  :to="'/pages/views/user/Discribe/Discribe?id='+item.id">
						<view class="item-img-box">
							<image :src="item.imgUrl" class="item-img"></image>
						</view>
						<view class="item-content">
							<view class="content">
								<view class="content-grow content-data " style="color:#EC8B89;" v-if="item.state=='等待修复'"><text>{{item.date}}（{{item.state}}）</text></view>
								<view class="content-grow content-data " style="color:#333333;" v-else-if="item.state=='已修复'"><text>{{item.date}}（{{item.state}}）</text></view>
								<view class="content-grow content-data " style="color:#f43530;" v-else><text>{{item.date}}（{{item.state}}）</text></view>
								<view class="content-grow content-discribe" v-html="item.discribe"></view>
								<router-link class="content-grow content-link" :to="'/pages/views/user/Discribe/Discribe?id='+item.id">查看更多</router-link>
							</view>
						</view>
					</router-link>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				suggestItems: [{
					id: '1',
					imgUrl: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3247665992,2317157710&fm=26&gp=0.jpg',
					date: '2020/04/03',
					state: '等待修复',
					discribe: '喷码机喷印工作不正常'
				},{
					id: '2',
					imgUrl: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3247665992,2317157710&fm=26&gp=0.jpg',
					date: '2020/04/03',
					state: '已修复',
					discribe: '喷码机喷印工作不正常'
				},{
					id: '3',
					imgUrl: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3247665992,2317157710&fm=26&gp=0.jpg',
					date: '2020/04/03',
					state: '未修复',
					discribe: '喷码机喷印工作不正常'
				},{
					id: '4',
					imgUrl: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3247665992,2317157710&fm=26&gp=0.jpg',
					date: '2020/04/03',
					state: '等待修复',
					discribe: '喷码机喷印工作不正常'
				},{
					id: '5',
					imgUrl: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3247665992,2317157710&fm=26&gp=0.jpg',
					date: '2020/04/03',
					state: '未修复',
					discribe: '喷码机喷印工作不正常'
				} ]

			}

		},
		methods: {

		}
	}
</script>

<style scoped>
	.items {
		background-color: #FFFFFF;
		display: flex;
		flex-direction: column;
		width: 100%;
	}

	.item {
		margin: 20rpx;
		border-bottom: 2rpx solid #EAEAEA;
		background-color: #FFFFFF;
		height: 160rpx;
		display: flex;
		flex-direction: row;
	}
	
	.link{
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: row;
	}
	
	.item-img-box {
		margin-right: 20rpx;
		text-align: center;
		width: 25%;
	}

	.item-img {
		height: 100%;
		width: 100%;
	}

	.item-content {
		width: 75%;
	}

	.content {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		height: 100%;
	}

	/* 16 13 14 */
	.content-data {
		font-size: 32rpx;
	}

	.content-discribe {
		color: #999999;
		font-size: 26rpx;
	}

	.content-link {
		font-size: 28rpx;
		color: #586C94;
	}

	.content-grow {
		flex-grow: 1;
	}

	a {
		text-decoration: none;
	}
</style>
